<template>
    <ShowCount :count="count" />
    <SetCount :count="count" @increment="increment" @decrement="decrement" @inputCount="inputCount" />
</template>

<script setup>
import ShowCount from './ShowCount.vue';
import SetCount from './SetCount.vue';
import { ref } from 'vue';

const count = ref(0);

function increment() {
    count.value++;
}
function decrement() {
    count.value--;
}
function inputCount(newCount) {
    count.value = newCount;
}
</script>

<style scoped></style>